package com.sikaryofficial.backend.utils;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author : qinjinyuan
 * @desc :
 * @date : 2023/11/14 9:29
 */
@NoArgsConstructor
@Data
public class PostCodeInfo {

    /**  国家*/
    private String country;
    /**  省份  County. The current county to which the postcode has been assigned.*/
    private String adminCounty;
    /**  城市   Region. Region (formerly GOR). The Region code for each postcode. The nine GORs were abolished on 1 April 2011 and are now known as ‘Regions’. They were the primary statistical subdivisions of England and also the areas in which the Government Offices for the Regions fulfilled their role. Each GOR covered a number of local authorities.*/
    private String region;
    /**  地区 District. The current district/unitary authority to which the postcode has been assigned.*/
    private String adminDistrict;
    /**  乡镇  Ward. The current ward/sub-unitary authority to which the postcode has been assigned.*/
    private String adminWard;

    /** 邮政编码 */
    private String postcode;

    /**Outward Code . The outward code is the part of the postcode before the single space in the middle. It is between two and four characters long. A few outward codes are non-geographic, not divulging where mail is to be sent. Examples of outward codes include "L1", "W1A", "RH1", "RH10" or "SE1P". */
    private String outcode;
    /** Inward Code. The inward part is the part of the postcode after the single space in the middle. It is three characters long. The inward code assists in the delivery of post within a postal district. Examples of inward codes include "0NY", "7GZ", "7HF", or "8JQ".*/
    private String incode;

    @JsonProperty("ccg")
    private String ccg;
    @JsonProperty("ced")
    private String ced;
    @JsonProperty("codes")
    private CodesDTO codes;

    @JsonProperty("date_of_introduction")
    private String dateOfIntroduction;
    @JsonProperty("eastings")
    private Integer eastings;
    @JsonProperty("european_electoral_region")
    private String europeanElectoralRegion;

    @JsonProperty("latitude")
    private Double latitude;
    @JsonProperty("longitude")
    private Double longitude;
    @JsonProperty("lsoa")
    private String lsoa;
    @JsonProperty("msoa")
    private String msoa;
    @JsonProperty("nhs_ha")
    private String nhsHa;
    @JsonProperty("northings")
    private Integer northings;
    @JsonProperty("nuts")
    private String nuts;

    @JsonProperty("parish")
    private String parish;
    @JsonProperty("parliamentary_constituency")
    private String parliamentaryConstituency;
    @JsonProperty("pfa")
    private String pfa;


    @JsonProperty("primary_care_trust")
    private String primaryCareTrust;
    @JsonProperty("quality")
    private Integer quality;


    @NoArgsConstructor
    @Data
    public static class CodesDTO {
        @JsonProperty("admin_county")
        private String adminCounty;
        @JsonProperty("admin_district")
        private String adminDistrict;
        @JsonProperty("admin_ward")
        private String adminWard;
        @JsonProperty("ccg")
        private String ccg;
        @JsonProperty("ccg_id")
        private String ccgId;
        @JsonProperty("ced")
        private String ced;
        @JsonProperty("lau2")
        private String lau2;
        @JsonProperty("lsoa")
        private String lsoa;
        @JsonProperty("msoa")
        private String msoa;
        @JsonProperty("nuts")
        private String nuts;
        @JsonProperty("parish")
        private String parish;
        @JsonProperty("parliamentary_constituency")
        private String parliamentaryConstituency;
        @JsonProperty("pfa")
        private String pfa;
    }
}
